package com.zyf.pojo;


import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import lombok.Data;
import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.ss.usermodel.DataFormat;
import org.apache.poi.ss.usermodel.FillPatternType;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;

import java.util.Date;

@Data
// 头背景设置成红色 IndexedColors.RED.getIndex()
@HeadStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,verticalAlignment = VerticalAlignment.CENTER, fillForegroundColor = 9,horizontalAlignment = HorizontalAlignment.CENTER )
// 头字体设置成20
@HeadFontStyle(fontHeightInPoints = 16,fontName = "宋体")
@HeadRowHeight(20)
@ColumnWidth(25)
@ContentRowHeight(20)
public class Goods {

    @ContentFontStyle(charset = HSSFFont.DEFAULT_CHARSET,fontHeightInPoints = 11,fontName = "Times New Roman")
    @ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER)
    @ExcelProperty(value = {"2018年8月份出货表","客户"},index = 0)
    private String customName;

    @ContentFontStyle(charset = HSSFFont.DEFAULT_CHARSET,fontHeightInPoints = 12,fontName = "Times New Roman")
    @ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER)
    @ExcelProperty(value = {"2018年8月份出货表","订单号"},index = 1)
    private String date;

    @ContentFontStyle(charset = HSSFFont.DEFAULT_CHARSET,fontHeightInPoints = 10,fontName = "Times New Roman")
    @ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER)
    @ExcelProperty(value = {"2018年8月份出货表","货号"},index = 2)
    private String productNo;

    @ContentFontStyle(charset = HSSFFont.DEFAULT_CHARSET,fontHeightInPoints = 10,fontName = "Times New Roman")
    @ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER)
    @ExcelProperty(value = {"2018年8月份出货表","数量"},index = 3)
    private String cnumber;

    @ContentFontStyle(fontHeightInPoints = 14,fontName = "方正姚体",charset = HSSFFont.DEFAULT_CHARSET)
    @ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER)
    @ExcelProperty(value = {"2018年8月份出货表","工厂"},index = 4)
    private String factory;

    @ContentFontStyle(fontHeightInPoints = 12,charset = HSSFFont.DEFAULT_CHARSET,fontName = "Times New Roman")
    @ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER)
    @ExcelProperty(value = {"2018年8月份出货表","工厂交期"},index = 5,format = "yyyy-MM-dd")
    private Date deliveryPeriod;

    @ContentFontStyle(charset = HSSFFont.DEFAULT_CHARSET,fontHeightInPoints = 12,fontName = "Times New Roman")
    @ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER)
    @ExcelProperty(value = {"2018年8月份出货表","船期"},index = 6,format = "yyyy-MM-dd")
    private Date shipTime;

    @ContentFontStyle(charset = HSSFFont.DEFAULT_CHARSET,fontHeightInPoints = 10,fontName = "Times New Roman" )
    @ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER)
    @ExcelProperty(value = {"2018年8月份出货表","贸易条款"},index = 7)
    private String tradeTerms;
}
